package _1_String;

public class A58_reverseLeftWords {
    public String reverseLeftWords(String s, int n) {
        StringBuilder stringBuilder = new StringBuilder(s);
        //把前n个字符串拿出来
        String substring = stringBuilder.substring(0, n);
        //把前n个字符串删掉
        stringBuilder.delete(0, n);
        //把前n个字符串加到后面
        stringBuilder.append(substring);
        return stringBuilder.toString();
    }

    public static void main(String[] args) {
        A58_reverseLeftWords reverseLeftWords = new A58_reverseLeftWords();
        String s = reverseLeftWords.reverseLeftWords("12345678", 3);
        System.out.println(s);
    }
}
